Open your module, add a [menus] header to it.
The sintax for the lines follows:
  <name> <where> +[flags] <description>

Where...
  name - Internal name of the popup. Any letter-number combination you want.
  where - The possible targets for this menu definition. For example, menubar,query,status
  flags - None. For future use.
  description - The name the user will see.

Then, on a [menudata] header, you add something as follows:
  airc_menu <name> {
    <menu>
  }


Sample:

[menus]
opcmds nicklist + OP Commands
chancmds channel + Channel actions

[menudata]
airc_menu opcmds {
  OP:op
  Deop:deop
}
airc_menu chancmds {
  Channel info...:channel
}




*** Enumerations
Enumerations are just a standardized way to make dynamic popups, based on other modules.
To request an enumeration, use:
  $submenu($menus_enum($1, <module>, <enum name>, [+flags], [parameters]))
Flags are reserved for future use.
You can put anything you want on 'parameters'. It will be passed to the hooks as $4-.

For example, let's suppose you want to have a "sockets" menu, filled with tools from other modules.
A possible way to do it would be:

[menus]
sockets menubar + Socket tools
[menudata]
airc_menu sockets {
  Sockets
  .$submenu($menus_enum($1, sockets, socktools))
}

If a module wants to add an item to your enum, it should use the menus_enum hook. On this hook,
$1 stands for the module name, $2 for the enum name, $3 for flags (left as '+' for now, and may have
nothing to do with the $menus_enum() flags) and $4- for the parameters you used. To add an item, use
/menus_additem <item>:<command>.
A telnet module could add an item to the Sockets menu as follows:

[hooks]
menus_enum 50 + telnet_onmenuenum
(...)
alias telnet_onmenuenum {
  if ($1-2 == sockets socktools) { menus_additem Telnet:telnet_command }
}